Contents
 SETUP.EXE 3.0

Visual Basic Setup Kit Bootstrap Program Alternative

28 August 1993

Developed by Mike Chapman (CIS 100030,351). Portions of this product were provided by Bob Feller.

Contents

Introduction

What is SETUP.EXE used for ?

Reference

Differences from the Microsoft-supplied version

Compatibility with SetupWizard

SETUP.EXE 3.0 features

Change History

Use

How to use SETUP.EXE 3.0

SETUP.INF file

SETUP.EXE 3.0 is freeware. Feel free to use this program when distributing your applications. That's what is was written for after all. The usual stuff about "no warrenty is expressed or implied" should be observed however. If you want to pass on SETUP.EXE and SETUPEXE.HLP you must make sure they remain in their original forms.


 What is SETUP.EXE used for ?

SETUP.EXE is the program which the user runs to install your application. It pre-installs specific files which are used by the main Setup program which performs the actual application installation. Once these files are installed it will run the main Setup program. It is sometimes referred to as a bootstrap program.

Your main Setup program (called SETUP1.EXE) which provides the user with a nice friendly interface when installing your application (asks where to install the application on the user's hard disk, progress meters, configuration options, etc.) will be written in Visual Basic and in order to run will require some DLLs to be available (notably VBRUNx00.DLL and possibly SETUPKIT.DLL, VER.DLL and DDEML.DLL).

If your main Setup program is run off the floppy disk all these files have to be present on it or somewhere in the user's Path (e.g. hard disk). If these files are not available from the Path then they must be on the floppy and then if Windows is still running when the installation is finished and the user removes the floppy disk the next Visual Basic application to run might think the DLLs it needs are on that floppy drive and Windows will put up an error message even though the DLL is in the System directory.

The other issue is that all these DLLs waste a lot of disk space (some 450k) when stored in a usable form on the floppy disk. If they were compressed you could fit that much more of your application on it instead. Of course, if they are compressed you can't run your main Visual Basic Setup program using them.

The third point is that the installation process will run a lot slower from the floppy disk instead of the hard disk. However, this won't be such an issue if you are installing the application from a Network drive.

Hence a bootstrap program to copy (and optionally decompress) the files required for the installation process to the user's hard disk.


 Differences from the Microsoft-supplied version

See Also

A SETUP.EXE is provided with Visual Basic in the KITFILES subdirectory but it differs from this alternative SETUP.EXE in a number of significant areas:

Microsoft-supplied	SETUP.EXE 3.0
Requires that all Visual Basic programs running be closed before the Setup process can commence. Your users may not know which applications are Visual Basic or not and may not want or be able to close them down anyway - they may even be running a VB frontend ! This is also of no use if you wish to call the Setup process from a VB application.	No restriction imposed.
Will copy all files regardless of whether they are already on the user's hard disk. This wastes time.	Will not copy a file if it already exists.
Requires VER.DLL to be stored uncompressed on the disk.	All files to be used by the main Visual Basic setup program SETUP1.EXE (including itself) can be compressed.
Requires the more advanced version of LZEXPAND.DLL to be present on the user's hard disk. This file existed in an early form on Windows 3.0 machines and isn't compatible with this SETUP.EXE.	Works with the original Windows 3.0 LZEXPAND.DLL.
	User-customisable Setup dialogue box title, message and size.
If there is not enough space on the user's hard disk to copy the pre-install files an error message is displayed informing the user that it could not copy a particular file with no reason given.	If there is not enough space on the user's hard disk an error message is displayed informing the user of this fact and pointing out the disk space required.
Requires that any files that are compressed must be compressed with the -r switch to store the uncompressed file name.	No such requirement.
SETUP.EXE size: 15k	SETUP.EXE size: 8k


 SETUP.EXE 3.0 features

Developer-customisable Setup dialogue box title, message and size.

Any number of pre-install files may be specified.

All pre-install files may be compressed with COMPRESS.EXE.

Optionally copy the main Visual Basic setup program (SETUP1.EXE) to the user's Windows directory with a developer-specified file name.

Allows installation to proceed with other Visual Basic programs running.

Notifies user if there is not enough space on hard disk to copy pre-install files.

Will not copy files that already exist on the user's hard disk.

When installing to a network workstation it will copy the pre-install files to the user's Windows directory instead of the networked System directory.

Is only 8k in size.

Works with Visual Basic 1,2 and 3 and Windows 3.x and Windows for Workgroups.


 Change History

Version 1.01	01/08/92 - Bob Feller.

Pass install path to VB Setup program.

Version 2.0	05/02/93 - Mike Chapman.

Centralise Setup dialogue box.

Change to copy VBRUN200.DLL instead of 100 and also copy DDEML.DLL.

Version 3.0	28/08/93 - Mike Chapman.

Use INF file for customisable Setup dialogue box title, message and size. Pre-installs any number of files and checks for required disk space.


 How to use SETUP.EXE 3.0

1. Determine which DLLs your Visual Basic setup program (SETUP1.EXE) requires to run. This is likely to include VBRUNx00.DLL, SETUPKIT.DLL, VER.DLL and possibly DDEML.DLL. It may also include some VBXs like THREED.VBX.

2. As specified in the Visual Basic 3.0 on-line help (search on Setup Toolkit ) create your distribution disk. Other versions of VB describe the Setup Toolkit elsewhere. Note that with SETUP.EXE 3.0 you do not need to compress files with the -r parameter. Note also its compatibility with the VB 3.0 SetupWizard.

3. Code the required settings in the SETUP.INF text file.

4. Copy SETUP.EXE and SETUP.INF to your distribution disk.


 Compatibility with SetupWizard

See Also

SETUP.EXE 3.0 is not automatically compatible with the Visual Basic 3.0 SetupWizard. To make use of it you will have to:

1. Run the SetupWizard as normal and create a distribution disk.

2. Examine the SETUP.LST file on the distribution disk.

3. The first file listed is the name of the main Setup program to be run. Code this file in the SETUP.INF SetupFileName entry.

3. All the other files listed are the pre-installation files. For each one code a Filen entry in the SETUP.INF.

5. Delete the SETUP.LST file from the distribution disk.

6. Copy the SETUP.EXE 3.0 and SETUP.INF files to the distribution disk.

You will be able to compress VER.DLL now that you are using SETUP.EXE 3.0 (assuming you require it as a pre-installation file).


See Also

Compatibility with SetupWizard

SETUP.EXE 3.0 features


See Also

SETUP.INF file


 SETUP.INF file

Example

SETUP.INF is a text file that lists all the files which SETUP.EXE 3.0 pre-installs on the user's machine. It also contains various optional configuration settings for the initial Setup dialogue box and the amount of space the pre-install files require.

All the following SETUP.EXE settings appear under the [BootSetup] section heading:

DialogTitle=

DialogMessage=

DialogWidth=

DialogHeight=

SetupFileName=

FreeSpace=

Filen=

The SETUP.INF file name was chosen because most commercial Setup programs seem to use this name as a standard and if your main Visual Basic Setup program (SETUP1.EXE) reads settings to determine what files the actual application requires to be installed then it makes sense to use only one file.


SETUP.INF example

[BootSetup]

DialogTitle=Loan Application Setup

DialogMessage=Please wait...

DialogWidth=300

DialogHeight=150

SetupFileName=SETLOAN.EXE

FreeSpace=472832

File1=VBRUN300.DLL

File2=SETUPKIT.DLL

File3=DDEML.DLL

File4=VER.DLL


DialogTitle SETUP.INF setting
 DialogTitle setting

See Also

The title bar text of the Setup dialogue box can be customised.

To specify the title bar text code the following setting in the SETUP.INF file:

[BootSetup]

DialogTitle=text

Text can be any characters you like. If no DialogTitle setting is specified then the default text used will be Setup.

You may find you need to increase the width of the dialogue box using the DialogWidth setting from its default if you want a particularly long title.


See Also

SETUP.INF file

DialogWidth setting


DialogMessage SETUP.INF setting
 DialogMessage setting

See Also

The message text displayed in the Setup dialogue box can be customised.

To specify the message text code the following setting in the SETUP.INF file:

[BootSetup]

DialogMessage=text

Text can be any characters you like. If no DialogMessage setting is specified then the default text used will be Initializing Setup...

You may find you need to increase the width of the dialogue box using the DialogWidth setting from its default if you want a particularly long message.

Note: This version of SETUP.EXE will not allow you to have multiple lines of text and it does not automatically centralise the text in the dialogue box. Yet. A future version is slated to include these features, but no promises as to when it may appear... If you want to centralise your text you will have to add leading spaces to the text to pad it out.


DialogWidth SETUP.INF setting
 DialogWidth setting

See Also

The width of the Setup dialogue box can be customised.

To specify a width code the following setting in the SETUP.INF file:

[BootSetup]

DialogWidth=width

The width is measured in pixels. If no DialogWidth setting is specified then the default width is 200 pixels.


See Also

SETUP.INF file

DialogHeight setting


DialogHeight SETUP.INF setting
 DialogHeight setting

See Also

The height of the Setup dialogue box can be customised.

To specify a height code the following setting in the SETUP.INF file:

[BootSetup]

DialogHeight=height

The height is measured in pixels. If no DialogHeight setting is specified then the default height is 100 pixels.


SetupFileName SETUP.INF setting
 SetupFileName setting

See Also

The SetupFileName setting specifies the name to rename the main Visual Basic Setup program (SETUP1.EXE) to when it is copied to the user's Windows directory. It is an optional setting and is coded in the SETUP.INF file as follows:

[BootSetup]

SetupFileName=name

The name has to have the file extension specified but no path, e.g. LOANSTP.EXE. If this setting is not specified then SETUP1.EXE will be used instead.

SETUP1.EXE must be stored on the distribution disk as SETUP1.EX_ (an underscore as the last character of the extension).

Note: The file does not have to be compressed. If you do compress it then you must use the COMPRESS.EXE program supplied with Visual Basic. You do not have to use the -r parameter though.

If SETUP.EXE cannot find SETUP1.EX_ on the distribution disk or it has a problem copying it then the following message will be displayed and the installation process will stop:

This file will be copied into the Windows directory even if another file of that name exists. In that case the existing one would be overwritten.


See Also

SETUP.INF file

FreeSpace setting

Filen setting


FreeSpace SETUP.INF setting
 FreeSpace setting

See Also

The FreeSpace setting specifies the amount of disk space required to copy the pre-install files to the user's hard disk. It is an optional setting and is coded in the SETUP.INF file as follows:

[BootSetup]

FreeSpace=bytes

The number of bytes all the pre-install files (all those files specified by the Filen= settings) as well as the main Visual Basic Setup program (SETUP1.EXE) take up uncompressed must be specified.

When SETUP.EXE comes to copy the pre-install files it checks to see if these files already exist on the user's hard disk. If they do then it takes away the size of these files from the specified bytes required above to come to an accurate figure of what is required.

If there is not enough space then the following message is displayed:

If this setting is not specified and the user does not have enough hard disk space to install the pre-install files then SETUP.EXE will halt with an "Unexpected Error" message when the disk space is exhausted. We strongly suggest you to code this setting.


See Also

SETUP.INF file

SetupFileName setting

Filen setting


Filen SETUP.INF setting
 Filen setting

See Also

The Filen setting specifies the name of a pre-install file to copy to the user's hard disk before the main Visual Basic Setup program (SETUP1.EXE) is run. Any DLLs or VBXs which your Setup program uses must be specified. You can have any number of these settings and they are coded in the SETUP.INF file as follows:

[BootSetup]

Filen=name

Filen=name

etc...

Where n is the number of the Filen setting, e.g. File1, then File2, File3, etc. The name has to have the file extension specified but no path, e.g. VBRUN300.DLL.

The actual file must be stored on the distribution disk with the last character of the extension as an underscore ( _ ), e.g. VBRUN300.DL_. Remember that the Filen setting has to have the full name (without the underscore).

Note: The file does not have to be compressed. If you do not compress the file it must still have the last character of the extension as an underscore (_).

If you do compress the files then you must use the COMPRESS.EXE program supplied with Visual Basic. You do not have to use the -r parameter though.

If a file is specified which SETUP.EXE cannot find it on the distribution disk or has a problem copying it then the following message will be displayed noting the problem file and the installation process will stop:


See Also

SETUP.INF file

SetupFileName setting

FreeSpace setting